<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="java.util.*"%>
<%@ page import="com.fc.util.*" %>
<%@ page import="com.fc.model.*" %>
<%@ page import="com.fc.control.*" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<title>member_add_do.jsp</title>
	</head>

	<body>
		<%
		request.setCharacterEncoding("UTF-8");
		int id = Integer.parseInt(request.getParameter("id"));
  		String start_time=ParamUtil.getString(request,"start_time",null);
  		int kind=ParamUtil.getInt(request,"kind",0);
 		String end_time=ParamUtil.getString(request,"end_time",null);
  		int state=ParamUtil.getInt(request,"state",0);
 		String password=ParamUtil.getString(request,"password",null);
 		String phone=ParamUtil.getString(request,"phone",null);
  		
  		Member member=new Member();
  		
		member.setStart_time(start_time);
		member.setState(state);
		member.setPassword(password);
		member.setKind(kind);
		member.setEnd_time(end_time);
		member.setPhone(phone);

  		if(MemberControl.updateMember(member,id))
  			{
  				%>
	<script language="javascript">
  				alert("修改成功");
  				window.location.href="member.jsp";
  				</script>
		<%} else { %>
		<script language="javascript">
  				alert("修改失败");
  				history.back(-1);
  				</script>
		<%} 
   %>
	</body>
</html>
